package com.wanho.java157.ProductManagement.service.Impl;

import com.wanho.java157.ProductManagement.po.ProductInventory;
import com.wanho.java157.ProductManagement.service.InventoryService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.List;

import static org.junit.Assert.*;
@RunWith(SpringRunner.class)
@ContextConfiguration("classpath:spring/applicationContext.xml")
public class InventoryServiceImplTest {
@Autowired
private InventoryService inventoryService;
    @Test
    public void selectAll() {
        List<ProductInventory> productInventories = inventoryService.selectAll();
        for (ProductInventory productInventory : productInventories) {
            System.out.println(productInventory);
        }

    }
}